<template>
    <div class="pages" v-if="signalsRadio1.total > 10">
        <div style="display: flex; justify-content: space-between;">
            <div></div>
            <el-pagination small background layout="prev, pager, next" :total="signalsRadio1.total" class="mt-4"
                @current-change="handleCurrentChange" />
        </div>
    </div>
</template>

<script setup>
import { ref } from "vue";
import { useRadio1Store } from "@/pain/search/search";
import { useCounterVip } from "@/pain/vip/index.js";
import { decrypt } from "@/utils/index";
const useVip = useCounterVip();
const signalsRadio1 = useRadio1Store();
const currentPage = ref(1);
import { useRouter } from "vue-router";
const router = useRouter();
import { detail_dl } from '@/Api/shoop'

const handleCurrentChange = (val) => {
    // if (val > 1 && token.level_id < 2) {
    //     useVip.maskShow = true
    //     return
    // }
    // console.log(val);
    // console.log(signalsRadio1.xiangqing_id);
    currentPage.value = val;
    signalsRadio1.xiangqing_pages.currentPage = val;
    if (signalsRadio1.xiangqing_id == '1') {
        signalsRadio1.getcompany_details()
    } else if (signalsRadio1.xiangqing_id == '2') {
        signalsRadio1.getcompany_detail_zbs()
    } else if (signalsRadio1.xiangqing_id == '3') {
        signalsRadio1.getcompany_detail_wzbs()
    } else if (signalsRadio1.xiangqing_id == '4') {
        signalsRadio1.getNewData(router.currentRoute.value.query.name,val)
    } else if (signalsRadio1.xiangqing_id == '7') {
        signalsRadio1.getcompetitors()
    }
};




// defineExpose({ currentPage , pageSize })
</script>

<style lang="scss" scoped>
.pages {
    padding: 20px;
}
</style>